import request from '@/util/axios';

/**
 * 获取评论列表
 * @param {Object} params 查询参数
 * @returns {Promise} 返回Promise对象
 */
export function getCommentList(params) {
  return request({
    url: '/comment/list',
    method: 'get',
    params
  });
}

/**
 * 批量删除评论
 * @param {Array} ids 评论ID数组
 * @returns {Promise} 返回Promise对象
 */
export function deleteComments(ids) {
  return request({
    url: '/comment/deleteCheck',
    method: 'delete',
    data: ids
  });
}

/**
 * 导出评论数据到Excel
 * @param {Object} params 查询参数
 * @returns {Promise} 返回二进制数据流
 */
export function exportCommentExcel(params) {
  return request({
    url: '/comment/exportExcel',
    method: 'get',
    params,
    responseType: 'blob'
  });
}

/**
 * 审核评论
 * @param {Object} data 审核数据
 * @returns {Promise} 返回Promise对象
 */
export function auditComment(data) {
  return request({
    url: '/comment/audit',
    method: 'post',
    data
  });
} 